import Vue from 'vue'
import App from './App'

//引入store
import store from '@/store/index.js'

//引入u-view
import uView from "uview-ui";
Vue.use(uView);

//公共组件
import '@/components/globalComponents'

// 引入语言包，注意路径
import i18n from '@/common/locales/index.js'

// 由于微信小程序的运行机制问题，需声明如下一行，H5和APP非必填
Vue.prototype._i18n = i18n

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App,
	store,
	i18n
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/api/http.interceptor.js'
Vue.use(httpInterceptor, app)

// http接口API集中管理引入部分
import httpApi from '@/api/http.api.js'
Vue.use(httpApi, app)

app.$mount()
